﻿namespace Core
{
	using Domain;
	using Implementation;
	using Infrastructure;
	using Microsoft.Practices.Unity;

	public static class CoreRegistration
	{
		public static void RegisterWithIn(IUnityContainer container)
		{
			// Infrstrucutre
			container.RegisterType<IDomainSessionFactory, NHibernateDomainSessionFactory>();
			container.RegisterType<DomainSession, NHibernateDomainSession>();
			container.RegisterType<NHibernateSessionFactoryProvider, NHibernateSessionFactoryProvider>();

			// Domain
			container.RegisterType<IAlertRepository, NHibernateAlertRepository>();
			container.RegisterType<IAccountRepository, NHibernateAccountRepository>();
			container.RegisterType<IPersonRepository, NHibernatePersonRepository>();
			container.RegisterType<RegistrationService, RegistrationService>();
		}
	}
}
